# A valid snippet should starts with:
#
#		snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
#		endsnippet
#
# Snippet options:
#
#		b - Beginning of line.
#		i - In-word expansion.
#		w - Word boundary.
#		r - Regular expression
#		e - Custom context snippet
#		A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
#		snippet emitter "emitter properties" b
#		private readonly ${1} = new Emitter<$2>()
#		public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
#		endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt

# The Big title
snippet bt "The-big-title" b
" == ====
" == ==== ${1}
" == ====
${2}
endsnippet

# The Copyright
snippet cp "Copyright" b
" ${1}
" Author: ${2}
" Last Change: <+++>
" Version: ${3}
" Repository: ${4}
" Lisence: ${5}
endsnippet

# Functions (Normal)
snippet function "Function" b
function! ${1}
	${2}
endfunction
endsnippet

# Functions (Plugin)
snippet functionp "Function:Plugin" b
" FUNCTION: {{{ ${1}${2: Arguments intro} { ${3:Function intro} }
function! ${1} abort
	${4}
endfunction " }}}
endsnippet

# For loop (Without arguments)
snippet for "ForLoop" b
for ${1}
	${2}
endfor
endsnippet

# For loop (With arguments)
snippet fora "ForLoop:Arguments" b
for ${1:arguments} in ${2:list}
	${3}
endfor
endsnippet

# Let
snippet let "Make Var" b
let ${1:var} = ${2:value}
endsnippet

# Declare a variable
snippet dec "Declare variable" b
let ${1:var}
endsnippet

# Execute
snippet execute "Execute" i
execute "${1}"
endsnippet

# Command
snippet command "Command" b
command! -nargs=${1} ${2:command} call ${3:function}
endsnippet
